<extend name="Base/common"/>

<block name="header">
    <!-- <header class=" subhead" id="overview"> -->
        <!-- <div class="container"> -->
            <!-- <h2>Hey Joke</h2> -->
            <!-- <p class="lead"></p> -->
        <!-- </div> -->
    <!-- </header> -->
</block>

<block name="side">
<!-- 左侧 nav
================================================== -->
    <include file="Public/left_bar"/>
</block>

<block name="body">
    <div class="span9">
        <!-- Contents
        ================================================== -->
        <section id="contents">

            <form class="form-horizontal" action="{:U('Daily/save_report')}" method="post">
                <div class="control-group">
                    <label class="control-label" for="topic-title">标题</label>
                    <div class="controls">
                        <input type="text" name="title" placeholder="请输入标题" class="span3">
                    </div>
                </div>
                <div class="control-group">
                    <label class="control-label" for="topic-content">内容</label>
                    <div class="controls">
                        <textarea name="content" id="content" row="10">{$info['content']}</textarea>
                        <input type="hidden" name="parse" value="0">
                        {:hook('documentEditFormContent', array('name'=>'content','value'=>$info['content']))}
                    </div>
                </div>
                <div class="control-group">
                    <div class="controls">
                        <input type="hidden" name="pid" value="0">
                        <input type="hidden" name="type" value="2">
                        <input type="hidden" name="category_id" value="{$category.id}">
                        <input type="hidden" name="model_id" value="{$info.model_id}">
                        <input type="hidden" name="description" value="">
                        <button type="submit" class="btn">发 表</button>
                    </div>
                </div>
            </form>






        </section>
    </div>
        </div>
    <script>
        $(document).ready(function(){
            $(".qiandao").click(function(){
                var obj = $(this);
                $.post("{:U('Daily/do_active')}",{},function(msg){
                    obj.attr('value',msg.info);
                    if(msg.status==200){
                        obj.removeClass('btn-info');
                        obj.addClass('btn-success');
                    } else {
                        obj.removeClass('btn-info');
                        obj.addClass('btn-danger');
                    }
                },'json');
            });
            $(".qiantui").click(function(){
                var obj = $(this);
                $.post("{:U('Daily/off_active')}",{},function(msg){
                    obj.attr('value',msg.info);
                    if(msg.status==200){
                        obj.removeClass('btn-info');
                        obj.addClass('btn-success');
                    } else {
                        obj.removeClass('btn-info');
                        obj.addClass('btn-danger');
                    }
                },'json');
            });
        });



    </script>
</block>


